<!DOCTYPE html>



  


<html class="theme-next muse use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.2" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Hexo, NexT" />








  <link rel="shortcut icon" href="/favicon.ico?v=5.1.2" />






<meta name="description" content="总结了iOS开发过程中的一些常用宏，以后会陆陆续续添加进来。  12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788">
<meta property="og:type" content="article">
<meta property="og:title" content="iOS常用宏 定义">
<meta property="og:url" content="http://yoursite.com/2016/09/12/iOS常用宏定义/index.html">
<meta property="og:site_name" content="闫 通 亮 的 博 客">
<meta property="og:description" content="总结了iOS开发过程中的一些常用宏，以后会陆陆续续添加进来。  12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2017-09-20T05:42:46.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="iOS常用宏 定义">
<meta name="twitter:description" content="总结了iOS开发过程中的一些常用宏，以后会陆陆续续添加进来。  12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Muse',
    version: '5.1.2',
    sidebar: {"position":"left","display":"post","offset":12,"offset_float":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2016/09/12/iOS常用宏定义/"/>





  <title>iOS常用宏 定义 | 闫 通 亮 的 博 客</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">闫 通 亮 的 博 客</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2016/09/12/iOS常用宏定义/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="闫通亮">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="闫 通 亮 的 博 客">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">iOS常用宏 定义</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2016-09-12T20:22:03+08:00">
                2016-09-12
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <blockquote>
<p>总结了iOS开发过程中的一些常用宏，以后会陆陆续续添加进来。</p>
</blockquote>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div><div class="line">45</div><div class="line">46</div><div class="line">47</div><div class="line">48</div><div class="line">49</div><div class="line">50</div><div class="line">51</div><div class="line">52</div><div class="line">53</div><div class="line">54</div><div class="line">55</div><div class="line">56</div><div class="line">57</div><div class="line">58</div><div class="line">59</div><div class="line">60</div><div class="line">61</div><div class="line">62</div><div class="line">63</div><div class="line">64</div><div class="line">65</div><div class="line">66</div><div class="line">67</div><div class="line">68</div><div class="line">69</div><div class="line">70</div><div class="line">71</div><div class="line">72</div><div class="line">73</div><div class="line">74</div><div class="line">75</div><div class="line">76</div><div class="line">77</div><div class="line">78</div><div class="line">79</div><div class="line">80</div><div class="line">81</div><div class="line">82</div><div class="line">83</div><div class="line">84</div><div class="line">85</div><div class="line">86</div><div class="line">87</div><div class="line">88</div><div class="line">89</div><div class="line">90</div><div class="line">91</div><div class="line">92</div><div class="line">93</div><div class="line">94</div><div class="line">95</div><div class="line">96</div><div class="line">97</div><div class="line">98</div><div class="line">99</div><div class="line">100</div><div class="line">101</div><div class="line">102</div><div class="line">103</div><div class="line">104</div><div class="line">105</div><div class="line">106</div><div class="line">107</div><div class="line">108</div><div class="line">109</div><div class="line">110</div><div class="line">111</div><div class="line">112</div><div class="line">113</div><div class="line">114</div><div class="line">115</div><div class="line">116</div><div class="line">117</div><div class="line">118</div><div class="line">119</div><div class="line">120</div><div class="line">121</div><div class="line">122</div><div class="line">123</div><div class="line">124</div><div class="line">125</div><div class="line">126</div><div class="line">127</div><div class="line">128</div><div class="line">129</div><div class="line">130</div><div class="line">131</div><div class="line">132</div><div class="line">133</div><div class="line">134</div><div class="line">135</div><div class="line">136</div><div class="line">137</div><div class="line">138</div><div class="line">139</div><div class="line">140</div><div class="line">141</div><div class="line">142</div><div class="line">143</div><div class="line">144</div><div class="line">145</div><div class="line">146</div><div class="line">147</div><div class="line">148</div><div class="line">149</div><div class="line">150</div><div class="line">151</div><div class="line">152</div><div class="line">153</div><div class="line">154</div><div class="line">155</div><div class="line">156</div><div class="line">157</div><div class="line">158</div><div class="line">159</div><div class="line">160</div><div class="line">161</div></pre></td><td class="code"><pre><div class="line">  #define kStringIsEmpty(str) ([str isKindOfClass:[NSNull class]] || str == nil || [str length] &lt; 1 ? YES : NO )</div><div class="line">  #define kArrayIsEmpty(array) (array == nil || [array isKindOfClass:[NSNull class]] || array.count == 0)</div><div class="line">  #define kDictIsEmpty(dic) (dic == nil || [dic isKindOfClass:[NSNull class]] || dic.allKeys == 0)</div><div class="line">  #define kObjectIsEmpty(_object) (_object == nil \</div><div class="line">  || [_object isKindOfClass:[NSNull class]] \</div><div class="line">  || ([_object respondsToSelector:@selector(length)] &amp;&amp; [(NSData *)_object length] == 0) \</div><div class="line">  || ([_object respondsToSelector:@selector(count)] &amp;&amp; [(NSArray *)_object count] == 0))</div><div class="line">  #define kScreenWidth \</div><div class="line">  ([[UIScreen mainScreen] respondsToSelector:@selector(nativeBounds)] ? [UIScreen mainScreen].nativeBounds.size.width/[UIScreen mainScreen].nativeScale : [UIScreen mainScreen].bounds.size.width)</div><div class="line">  #define kScreenHeight \</div><div class="line">  ([[UIScreen mainScreen] respondsToSelector:@selector(nativeBounds)] ? [UIScreen mainScreen].nativeBounds.size.height/[UIScreen mainScreen].nativeScale : [UIScreen mainScreen].bounds.size.height)</div><div class="line">  #define kScreenSize \</div><div class="line">  ([[UIScreen mainScreen] respondsToSelector:@selector(nativeBounds)] ? CGSizeMake([UIScreen mainScreen].nativeBounds.size.width/[UIScreen mainScreen].nativeScale,[UIScreen mainScreen].nativeBounds.size.height/[UIScreen mainScreen].nativeScale) : [UIScreen mainScreen].bounds.size)</div><div class="line">  #define kApplication        [UIApplication sharedApplication]</div><div class="line">  #define kKeyWindow          [UIApplication sharedApplication].keyWindow</div><div class="line">  #define kAppDelegate        [UIApplication sharedApplication].delegate</div><div class="line">  #define kUserDefaults      [NSUserDefaults standardUserDefaults]</div><div class="line">  #define kNotificationCenter [NSNotificationCenter defaultCenter]</div><div class="line">  #define kAppVersion [[[NSBundle mainBundle] infoDictionary] objectForKey:@&quot;CFBundleShortVersionString&quot;]</div><div class="line">  #define kSystemVersion [[UIDevice currentDevice] systemVersion]</div><div class="line">  #define kCurrentLanguage ([[NSLocale preferredLanguages] objectAtIndex:0])</div><div class="line">  #define kISiPhone (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)</div><div class="line">  #define kISiPad (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)</div><div class="line">  #define kDocumentPath [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject]</div><div class="line">  #define kTempPath NSTemporaryDirectory()</div><div class="line">  #define kCachePath [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject]</div><div class="line">  #if TARGET_OS_IPHONE</div><div class="line">  //真机</div><div class="line">  #endif</div><div class="line">  #if TARGET_IPHONE_SIMULATOR</div><div class="line">  //模拟器</div><div class="line">  #endif</div><div class="line">  #ifdef DEBUG</div><div class="line">  #define NSLog(...) NSLog(@&quot;%s 第%d行 \n %@\n\n&quot;,__func__,__LINE__,[NSString stringWithFormat:__VA_ARGS__])</div><div class="line">  #else</div><div class="line">   #define NSLog(...)</div><div class="line">   #endif</div><div class="line">  #define kRGBColor(r, g, b)    [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]</div><div class="line">  #define kRGBAColor(r, g, b, a) [UIColor colorWithRed:(r)/255.0 green:(r)/255.0 blue:(r)/255.0 alpha:a]</div><div class="line">  #define kRandomColor    KRGBColor(arc4random_uniform(256)/255.0,arc4random_uniform(256)/255.0,arc4random_uniform(256)/255.0)        //随机色生成</div><div class="line">  #define kColorWithHex(rgbValue) \</div><div class="line">  [UIColor colorWithRed:((float)((rgbValue &amp; 0xFF0000) &gt;&gt; 16)) / 255.0 \</div><div class="line">  green:((float)((rgbValue &amp; 0xFF00) &gt;&gt; 8)) / 255.0 \</div><div class="line">  blue:((float)(rgbValue &amp; 0xFF)) / 255.0 alpha:1.0]</div><div class="line">  #define kWeakSelf(type)  __weak typeof(type) weak##type = type;</div><div class="line">  #define kStrongSelf(type) __strong typeof(type) type = weak##type;</div><div class="line">  #define kDegreesToRadian(x)      (M_PI * (x) / 180.0)</div><div class="line">  #define kRadianToDegrees(radian) (radian * 180.0) / (M_PI)</div><div class="line">  #define kStartTime CFAbsoluteTime start = CFAbsoluteTimeGetCurrent();</div><div class="line">  #define kEndTime  NSLog(@&quot;Time: %f&quot;, CFAbsoluteTimeGetCurrent() - start)</div><div class="line">#ifndef MacroDefinition_h      // 如果没定义</div><div class="line">#define MacroDefinition_h</div><div class="line">获取设备尺寸大小</div><div class="line"></div><div class="line">  #define NavigationBar_HEIGHT 44</div><div class="line">  #define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)</div><div class="line">  #define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height)</div><div class="line">打印日志</div><div class="line"></div><div class="line">  #ifdef DEBUG</div><div class="line">  #  define DLog(fmt, ...) NSLog((@&quot;%s [Line %d] &quot; fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);</div><div class="line">  #else</div><div class="line">  #  define DLog(...)</div><div class="line">  #endif</div><div class="line">  #if DEBUG</div><div class="line">  #define NSLog(FORMAT, ...) fprintf(stderr,&quot;\nfunction:%s line:%d content:%s\n&quot;, __FUNCTION__, __LINE__, ［NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);</div><div class="line">  #else</div><div class="line">  #define NSLog(FORMAT, ...) nil</div><div class="line">  #endif</div><div class="line">#ifdef DEBUG</div><div class="line">  #  define ULog(fmt, ...)  &#123; UIAlertView *alert = ［UIAlertView alloc] initWithTitle:[NSString stringWithFormat:</div><div class="line">  @&quot;%s\n [Line %d] &quot;, __PRETTY_FUNCTION__, __LINE__] message:[NSString stringWithFormat:fmt, ##__VA_ARGS__]  </div><div class="line">  delegate:nil cancelButtonTitle:@&quot;Ok&quot; otherButtonTitles:nil]; [alert show]; &#125;</div><div class="line">  #else</div><div class="line">  #  define ULog(...)</div><div class="line">  #endif</div><div class="line">    #define ITTDEBUG</div><div class="line">    #define ITTLOGLEVEL_INFO    10</div><div class="line">    #define ITTLOGLEVEL_WARNING  3</div><div class="line">    #define ITTLOGLEVEL_ERROR    1</div><div class="line">    #ifndef ITTMAXLOGLEVEL</div><div class="line">    #ifdef DEBUG</div><div class="line">    #define ITTMAXLOGLEVEL ITTLOGLEVEL_INFO</div><div class="line">    #else</div><div class="line">    #define ITTMAXLOGLEVEL ITTLOGLEVEL_ERROR</div><div class="line">    #endif</div><div class="line">    #endif</div><div class="line">  #ifdef ITTDEBUG</div><div class="line">  #define ITTDPRINT(xx, ...)  NSLog(@&quot;%s(%d): &quot; xx, __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)</div><div class="line">  #else</div><div class="line">  #define ITTDPRINT(xx, ...)  ((void)0)</div><div class="line">  #endif</div><div class="line">  #define ITTDPRINTMETHODNAME() ITTDPRINT(@&quot;%s&quot;, __PRETTY_FUNCTION__)</div><div class="line">  #if ITTLOGLEVEL_ERROR &lt;= ITTMAXLOGLEVEL</div><div class="line">  #define ITTDERROR(xx, ...)  ITTDPRINT(xx, ##__VA_ARGS__)</div><div class="line">  #else</div><div class="line">  #define ITTDERROR(xx, ...)  ((void)0)</div><div class="line">  #endif</div><div class="line">  #if ITTLOGLEVEL_WARNING &lt;= ITTMAXLOGLEVEL</div><div class="line">  #define ITTDWARNING(xx, ...)  ITTDPRINT(xx, ##__VA_ARGS__)</div><div class="line">  #else</div><div class="line">  #define ITTDWARNING(xx, ...)  ((void)0)</div><div class="line">  #endif</div><div class="line">  #if ITTLOGLEVEL_INFO &lt;= ITTMAXLOGLEVEL</div><div class="line">  #define ITTDINFO(xx, ...)  ITTDPRINT(xx, ##__VA_ARGS__)</div><div class="line">  #else</div><div class="line">  #define ITTDINFO(xx, ...)  ((void)0)</div><div class="line">  #endif</div><div class="line">  #ifdef ITTDEBUG</div><div class="line">  #define ITTDCONDITIONLOG(condition, xx, ...) &#123; if ((condition)) &#123; \</div><div class="line">   ITTDPRINT(xx, ##__VA_ARGS__); \</div><div class="line">  &#125; \</div><div class="line">  &#125; ((void)0)</div><div class="line">  #else</div><div class="line">  #define ITTDCONDITIONLOG(condition, xx, ...) ((void)0)</div><div class="line">  #endif</div><div class="line">  #define ITTAssert(condition, ...)                                      \</div><div class="line">  do &#123;                                                                      \</div><div class="line">  if (!(condition)) &#123;                                                    \</div><div class="line">  ［NSAssertionHandler currentHandler]                                  \</div><div class="line">  handleFailureInFunction:[NSString                 stringWithUTF8String:__PRETTY_FUNCTION__] \</div><div class="line">  file:[NSString stringWithUTF8String:__FILE__]  \</div><div class="line">  lineNumber:__LINE__                                  \</div><div class="line">  description:__VA_ARGS__];                            \</div><div class="line">  &#125;                                                                      \</div><div class="line">  &#125; while(0)</div><div class="line"> #define isPad (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)</div><div class="line"> #define someThing (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)? ipad: iphone</div><div class="line">  #define IOS_VERSION ［[UIDevice currentDevice] systemVersion] floatValue]</div><div class="line">  #define CurrentSystemVersion ［UIDevice currentDevice] systemVersion]</div><div class="line">  #define CurrentLanguage (［NSLocale preferredLanguages] objectAtIndex:0])</div><div class="line">  #define isRetina ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), ［UIScreen mainScreen] currentMode].size) : NO)</div><div class="line">  #define iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), ［UIScreen mainScreen] currentMode].size) : NO)</div><div class="line">  #define isPad (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)</div><div class="line">  #define IOS7 (［[UIDevice currentDevice].systemVersion doubleValue] &gt;= 7.0]</div><div class="line">  #define kScreenIphone5    ((［UIScreen mainScreen] bounds].size.height)&gt;=568)</div><div class="line">  #define kMainScreenHeight ([UIScreen mainScreen].applicationFrame.size.height)</div><div class="line">  #define kMainScreenWidth  ([UIScreen mainScreen].applicationFrame.size.width)</div><div class="line">  #define TT_RELEASE_CF_SAFELY(__REF) &#123; if (nil != (__REF)) &#123; CFRelease(__REF); __REF = nil; &#125; &#125;</div><div class="line">  #if TARGET_OS_IPHONE                           //iPhone Device</div><div class="line">  #endif</div><div class="line">    #if TARGET_IPHONE_SIMULATOR          //iPhone Simulator</div><div class="line">    #endif</div><div class="line">  #define SYSTEM_VERSION_EQUAL_TO(v)                  (［[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)</div><div class="line">  #define SYSTEM_VERSION_GREATER_THAN(v)              (［[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)</div><div class="line">  #define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v)  (［[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)</div><div class="line">  #define SYSTEM_VERSION_LESS_THAN(v)                (［[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)</div><div class="line">  #define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v)    (［[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)</div><div class="line">  #if __has_feature(objc_arc)</div><div class="line">  //compiling with ARC</div><div class="line">  #else</div><div class="line">  // compiling without ARC</div><div class="line">  #endif</div><div class="line">    #pragma mark - common functions</div><div class="line">    #define RELEASE_SAFELY(__POINTER) &#123; [__POINTER release]; __POINTER = nil; &#125;</div><div class="line">  #define SAFE_DELETE(P) if(P) &#123; [P release], P = nil; &#125;</div><div class="line">  #define SAFE_RELEASE(x) [x release];x=nil</div><div class="line">  #define LOADIMAGE(file,ext) [UIImage imageWithContentsOfFile:［NSBundle mainBundle]pathForResource:file ofType:ext］</div><div class="line">  #define IMAGE(A) [UIImage imageWithContentsOfFile:［NSBundle mainBundle] pathForResource:A ofType:nil］</div><div class="line">  #define ImageNamed(_pointer) [UIImage imageNamed:[UIUtil imageName:_pointer］</div><div class="line">//建议使用前两种宏定义,性能高于后者</div></pre></td></tr></table></figure>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2015/07/13/Markdown用法/" rel="next" title="Markdown一些简单的用法">
                <i class="fa fa-chevron-left"></i> Markdown一些简单的用法
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/09/13/python脚本批量上传kindle电子书/" rel="prev" title="python脚本批量上传kindle电子书">
                python脚本批量上传kindle电子书 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      

      <section class="site-overview sidebar-panel sidebar-panel-active">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          
            <p class="site-author-name" itemprop="name">闫通亮</p>
            <p class="site-description motion-element" itemprop="description"></p>
        </div>

        <nav class="site-state motion-element">

          
            <div class="site-state-item site-state-posts">
            
              <a href="/archives/">
            
                <span class="site-state-item-count">4</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          
            
            
            <div class="site-state-item site-state-categories">
              
                <span class="site-state-item-count">1</span>
                <span class="site-state-item-name">分类</span>
              
            </div>
          

          
            
            
            <div class="site-state-item site-state-tags">
              
                <span class="site-state-item-count">2</span>
                <span class="site-state-item-name">标签</span>
              
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
        </div>

        
        

        
        

        


      </section>

      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2017</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">闫通亮</span>

  
</div>


  <div class="powered-by">由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动</div>

  <span class="post-meta-divider">|</span>

  <div class="theme-info">主题 &mdash; <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">NexT.Muse</a> v5.1.2</div>


        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.2"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.2"></script>



  
  

  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.2"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.2"></script>


  

  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.2"></script>



  


  




	





  





  








  





  

  

  

  

  

  



</body>
</html>

<!-- 页面点击小红心 -->
<script type="text/javascript" src="/js/src/love.js"></script>
<script type="text/javascript" src="/js/src/bg.js"></script>


